package cst.start.teachresourceplatform224xmz.activity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;

import cst.start.teachresourceplatform224xmz.R;

public class ViewActivity extends AppCompatActivity {
    private int resid;
    private String mod;
    private WebView webView;
    private String BASEURL="http://amicool.neusoft.edu.cn/";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view);
        System.out.println("----查看详情");

        resid  = getIntent().getIntExtra("resid",1);
        mod= getIntent().getStringExtra("mod");
        webView = (WebView)findViewById(R.id.webview);
        webView.loadUrl(BASEURL+mod+".php/show/index/id/"+resid);
    }
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu, menu);
        return true;
    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        return super.onOptionsItemSelected(item);
    }
}
